<?php

namespace App\Enum;


class OrderEnum
{


    /**
     * 状态
     */
    const RESERVATION = '1'; // 预约中
    const TAKE_ORDER = '2'; // 已接单
    const SERVICE = '3'; // 正在服务
    const NOT_PAY = '4'; // 未支付
    const PAID = '5'; // 已支付
    const COMMENT = '6'; // 已评价
    const CANCEL_PASSENGER = '-1'; // 乘客取消
    const CANCEL_DRIVER = '-2'; // 司机取消
    const CANCEL_ADMIN = '-3'; //后台取消


    public static $statusMessage = [
        self::RESERVATION => '预约中',
        self::TAKE_ORDER => '已接单',
        self::SERVICE => '正在服务',
        self::NOT_PAY => '未支付',
        self::PAID => '已支付',
        self::COMMENT => '已评价',
        self::CANCEL_PASSENGER => '乘客取消',
        self::CANCEL_DRIVER => '司机取消',
        self::CANCEL_ADMIN => '后台取消'
    ];


    public static function statusMessage($code)
    {
        return self::$statusMessage[$code];
    }
}
